package com.aidex.baseinfo.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.BaseEntity;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.baseinfo.mapper.BaseWarehouseMapper;
import com.aidex.baseinfo.domain.BaseWarehouse;
import com.aidex.baseinfo.service.BaseWarehouseService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 仓库信息Service业务层处理
 * @author cq
 * @email 382425530@qq.com
 * @date 2023-06-21
 */
@Service
@Transactional(readOnly = true)
public class BaseWarehouseServiceImpl extends BaseServiceImpl<BaseWarehouseMapper, BaseWarehouse> implements BaseWarehouseService {

    private static final Logger log = LoggerFactory.getLogger(BaseWarehouseServiceImpl.class);

    /**
     * 获取单条数据
     * @param baseWarehouse 仓库信息
     * @return 仓库信息
     */
    @Override
    public BaseWarehouse get(BaseWarehouse baseWarehouse) {
        BaseWarehouse dto = super.get(baseWarehouse);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 仓库信息id
     * @return 仓库信息
     */
    @Override
    public BaseWarehouse get(String id) {
        BaseWarehouse dto = super.get(id);
        return dto;
    }

    /**
     * 查询仓库信息列表
     * @param baseWarehouse 仓库信息
     * @return 仓库信息
     */
    @Override
    public List<BaseWarehouse> findList(BaseWarehouse baseWarehouse) {
		List<BaseWarehouse> baseWarehouseList = super.findList(baseWarehouse);
        return baseWarehouseList;
    }

    /**
     * 分页查询仓库信息列表
     * @param baseWarehouse 仓库信息
     * @return 仓库信息
     */
    @Override
    public PageInfo<BaseWarehouse> findPage(BaseWarehouse baseWarehouse) {
		PageInfo<BaseWarehouse> page = super.findPage(baseWarehouse);
        return page;
    }

    /**
     * 保存仓库信息
     * @param baseWarehouse
     * @return 结果
     */
    @Override
    public boolean save(BaseWarehouse baseWarehouse) {
        return super.save(baseWarehouse);
    }

    /**
     * 删除仓库信息信息
     * @param baseWarehouse
     * @return 结果
     */
    @Override
    public boolean remove(BaseWarehouse baseWarehouse) {
        return super.remove(baseWarehouse);
    }

    /**
     * 批量删除仓库信息
     * @param ids 需要删除的仓库信息ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBaseWarehouseByIds(String[] ids) {
        return mapper.deleteBaseWarehouseByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

}
